\(\int \frac {(a+b \tan (e+f x))^3 (A+B \tan (e+f x)+C \tan ^2(e+f x))}{(c+d \tan (e+f x))^2} \, dx\) [77]
Optimal result
Integrand size = 45, antiderivative size = 579 \[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=-\frac {\left (a^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) x}{\left (c^2+d^2\right )^2}+\frac {\left (3 a^2 b \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}+\frac {(b c-a d)^2 \left (b \left (3 c^4 C-2 B c^3 d+c^2 (A+5 C) d^2-4 B c d^3+3 A d^4\right )+a d^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (c+d \tan (e+f x))}{d^4 \left (c^2+d^2\right )^2 f}+\frac {b^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan (e+f x)}{d^3 \left (c^2+d^2\right ) f}+\frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}
\]
[Out]
-(a^3*(c^2*C-2*B*c*d-C*d^2-A*(c^2-d^2))-3*a*b^2*(c^2*C-2*B*c*d-C*d^2-A*(c^2-d^2))-3*a^2*b*(2*c*(A-C)*d-B*(c^2-
d^2))+b^3*(2*c*(A-C)*d-B*(c^2-d^2)))*x/(c^2+d^2)^2+(3*a^2*b*(c^2*C-2*B*c*d-C*d^2-A*(c^2-d^2))-b^3*(c^2*C-2*B*c
*d-C*d^2-A*(c^2-d^2))+a^3*(2*c*(A-C)*d-B*(c^2-d^2))-3*a*b^2*(2*c*(A-C)*d-B*(c^2-d^2)))*ln(cos(f*x+e))/(c^2+d^2
)^2/f+(-a*d+b*c)^2*(b*(3*c^4*C-2*B*c^3*d+c^2*(A+5*C)*d^2-4*B*c*d^3+3*A*d^4)+a*d^2*(2*c*(A-C)*d-B*(c^2-d^2)))*l
n(c+d*tan(f*x+e))/d^4/(c^2+d^2)^2/f+b^2*(a*d*(3*c^2*C-B*c*d+(A+2*C)*d^2)-b*(3*c^3*C-2*B*c^2*d+c*(A+2*C)*d^2-B*
d^3))*tan(f*x+e)/d^3/(c^2+d^2)/f+1/2*b*(3*c^2*C-2*B*c*d+(2*A+C)*d^2)*(a+b*tan(f*x+e))^2/d^2/(c^2+d^2)/f-(A*d^2
-B*c*d+C*c^2)*(a+b*tan(f*x+e))^3/d/(c^2+d^2)/f/(c+d*tan(f*x+e))
Rubi [A] (verified)
Time = 2.52 (sec) , antiderivative size = 579, normalized size of antiderivative = 1.00, number of
steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3726, 3728, 3718, 3707, 3698,
31, 3556} \[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\frac {\log (\cos (e+f x)) \left (a^3 \left (2 c d (A-C)-B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )-2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)-B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )-2 B c d+c^2 C-C d^2\right )\right )}{f \left (c^2+d^2\right )^2}-\frac {x \left (a^3 \left (-A \left (c^2-d^2\right )-2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)-B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )-2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)-B \left (c^2-d^2\right )\right )\right )}{\left (c^2+d^2\right )^2}+\frac {b^2 \tan (e+f x) \left (a d \left (d^2 (A+2 C)-B c d+3 c^2 C\right )-b \left (c d^2 (A+2 C)-2 B c^2 d-B d^3+3 c^3 C\right )\right )}{d^3 f \left (c^2+d^2\right )}-\frac {\left (A d^2-B c d+c^2 C\right ) (a+b \tan (e+f x))^3}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}+\frac {b \left (d^2 (2 A+C)-2 B c d+3 c^2 C\right ) (a+b \tan (e+f x))^2}{2 d^2 f \left (c^2+d^2\right )}+\frac {(b c-a d)^2 \left (a d^2 \left (2 c d (A-C)-B \left (c^2-d^2\right )\right )+b \left (c^2 d^2 (A+5 C)+3 A d^4-2 B c^3 d-4 B c d^3+3 c^4 C\right )\right ) \log (c+d \tan (e+f x))}{d^4 f \left (c^2+d^2\right )^2}
\]
[In]
Int[((a + b*Tan[e + f*x])^3*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(c + d*Tan[e + f*x])^2,x]
[Out]
-(((a^3*(c^2*C - 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a*b^2*(c^2*C - 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a^2*
b*(2*c*(A - C)*d - B*(c^2 - d^2)) + b^3*(2*c*(A - C)*d - B*(c^2 - d^2)))*x)/(c^2 + d^2)^2) + ((3*a^2*b*(c^2*C
- 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^3*(c^2*C - 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + a^3*(2*c*(A - C)*d - B*(c
^2 - d^2)) - 3*a*b^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*Log[Cos[e + f*x]])/((c^2 + d^2)^2*f) + ((b*c - a*d)^2*(b
*(3*c^4*C - 2*B*c^3*d + c^2*(A + 5*C)*d^2 - 4*B*c*d^3 + 3*A*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*Log[
c + d*Tan[e + f*x]])/(d^4*(c^2 + d^2)^2*f) + (b^2*(a*d*(3*c^2*C - B*c*d + (A + 2*C)*d^2) - b*(3*c^3*C - 2*B*c^
2*d + c*(A + 2*C)*d^2 - B*d^3))*Tan[e + f*x])/(d^3*(c^2 + d^2)*f) + (b*(3*c^2*C - 2*B*c*d + (2*A + C)*d^2)*(a
+ b*Tan[e + f*x])^2)/(2*d^2*(c^2 + d^2)*f) - ((c^2*C - B*c*d + A*d^2)*(a + b*Tan[e + f*x])^3)/(d*(c^2 + d^2)*f
*(c + d*Tan[e + f*x]))
Rule 31
Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]
Rule 3556
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3698
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]
Rule 3707
Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[(a*A + b*B - a*C)*(x/(a^2 + b^2)), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]
Rule 3718
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[b*C*Tan[e + f*x]*((c + d*Tan[e + f*x])
^(n + 1)/(d*f*(n + 2))), x] - Dist[1/(d*(n + 2)), Int[(c + d*Tan[e + f*x])^n*Simp[b*c*C - a*A*d*(n + 2) - (A*b
+ a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C*d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; F
reeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && !LtQ[n, -1]
Rule 3726
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*t
an[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*d^2 + c*(c*C - B*d))*(a + b*Ta
n[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Dist[1/(d*(n + 1)*(c^2 + d^2)), I
nt[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c
*m + a*d*(n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b*(d*(B*c - A*d)*(m + n + 1
) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c -
a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Rule 3728
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*
tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d
*Tan[e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Tan[e + f*x])^(m - 1)*(c +
d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C*(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f
*x] - (C*m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}
, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !Intege
rQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Rubi steps \begin{align*}
\text {integral}& = -\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\int \frac {(a+b \tan (e+f x))^2 \left (A d (a c+3 b d)+(3 b c-a d) (c C-B d)+d ((A-C) (b c-a d)+B (a c+b d)) \tan (e+f x)+b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) \tan ^2(e+f x)\right )}{c+d \tan (e+f x)} \, dx}{d \left (c^2+d^2\right )} \\ & = \frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\int \frac {(a+b \tan (e+f x)) \left (-2 \left (b^2 c \left (3 c^2 C-2 B c d+(2 A+C) d^2\right )-a d (A d (a c+3 b d)+(3 b c-a d) (c C-B d))\right )+2 d^2 \left (2 a b (A c-c C+B d)+a^2 (B c-(A-C) d)-b^2 (B c-(A-C) d)\right ) \tan (e+f x)+2 b \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan ^2(e+f x)\right )}{c+d \tan (e+f x)} \, dx}{2 d^2 \left (c^2+d^2\right )} \\ & = \frac {b^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan (e+f x)}{d^3 \left (c^2+d^2\right ) f}+\frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\int \frac {-2 \left (a^3 d^3 (A c-c C+B d)+3 a^2 b d^2 \left (c^2 C-B c d+A d^2\right )-3 a b^2 c d \left (2 c^2 C-B c d+(A+C) d^2\right )+b^3 c \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right )-2 d^3 \left (3 a^2 b (A c-c C+B d)-b^3 (A c-c C+B d)+a^3 (B c-(A-C) d)-3 a b^2 (B c-(A-C) d)\right ) \tan (e+f x)-2 b \left (c^2+d^2\right ) \left (3 a^2 C d^2-3 a b d (2 c C-B d)+b^2 \left (3 c^2 C-2 B c d+(A-C) d^2\right )\right ) \tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{2 d^3 \left (c^2+d^2\right )} \\ & = -\frac {\left (a^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) x}{\left (c^2+d^2\right )^2}+\frac {b^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan (e+f x)}{d^3 \left (c^2+d^2\right ) f}+\frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\left (3 a^2 b \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \int \tan (e+f x) \, dx}{\left (c^2+d^2\right )^2}+\frac {\left ((b c-a d)^2 \left (b \left (3 c^4 C-2 B c^3 d+c^2 (A+5 C) d^2-4 B c d^3+3 A d^4\right )+a d^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right )\right ) \int \frac {1+\tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^3 \left (c^2+d^2\right )^2} \\ & = -\frac {\left (a^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) x}{\left (c^2+d^2\right )^2}+\frac {\left (3 a^2 b \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}+\frac {b^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan (e+f x)}{d^3 \left (c^2+d^2\right ) f}+\frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\left ((b c-a d)^2 \left (b \left (3 c^4 C-2 B c^3 d+c^2 (A+5 C) d^2-4 B c d^3+3 A d^4\right )+a d^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right )\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,d \tan (e+f x)\right )}{d^4 \left (c^2+d^2\right )^2 f} \\ & = -\frac {\left (a^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) x}{\left (c^2+d^2\right )^2}+\frac {\left (3 a^2 b \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C-2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}+\frac {(b c-a d)^2 \left (b \left (3 c^4 C-2 B c^3 d+c^2 (A+5 C) d^2-4 B c d^3+3 A d^4\right )+a d^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (c+d \tan (e+f x))}{d^4 \left (c^2+d^2\right )^2 f}+\frac {b^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right ) \tan (e+f x)}{d^3 \left (c^2+d^2\right ) f}+\frac {b \left (3 c^2 C-2 B c d+(2 A+C) d^2\right ) (a+b \tan (e+f x))^2}{2 d^2 \left (c^2+d^2\right ) f}-\frac {\left (c^2 C-B c d+A d^2\right ) (a+b \tan (e+f x))^3}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))} \\
\end{align*}
Mathematica [C] (verified)
Result contains complex when optimal does not.
Time = 7.60 (sec) , antiderivative size = 1022, normalized size of antiderivative = 1.77
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\frac {C (a+b \tan (e+f x))^3}{2 d f (c+d \tan (e+f x))}+\frac {\frac {(-3 b c C+2 b B d+3 a C d) (a+b \tan (e+f x))^2}{d f (c+d \tan (e+f x))}+\frac {2 \left (-\frac {d^2 \left (-3 a^2 A b c^2+A b^3 c^2-a^3 B c^2+3 a b^2 B c^2+3 a^2 b c^2 C-b^3 c^2 C+2 a^3 A c d-6 a A b^2 c d-6 a^2 b B c d+2 b^3 B c d-2 a^3 c C d+6 a b^2 c C d+3 a^2 A b d^2-A b^3 d^2+a^3 B d^2-3 a b^2 B d^2-3 a^2 b C d^2+b^3 C d^2+i \left (a^3 A c^2-3 a A b^2 c^2-3 a^2 b B c^2+b^3 B c^2-a^3 c^2 C+3 a b^2 c^2 C+6 a^2 A b c d-2 A b^3 c d+2 a^3 B c d-6 a b^2 B c d-6 a^2 b c C d+2 b^3 c C d-a^3 A d^2+3 a A b^2 d^2+3 a^2 b B d^2-b^3 B d^2+a^3 C d^2-3 a b^2 C d^2\right )\right ) \log (i-\tan (e+f x))}{2 \left (c^2+d^2\right )^2 f}+\frac {d^2 \left (3 a^2 A b c^2-A b^3 c^2+a^3 B c^2-3 a b^2 B c^2-3 a^2 b c^2 C+b^3 c^2 C-2 a^3 A c d+6 a A b^2 c d+6 a^2 b B c d-2 b^3 B c d+2 a^3 c C d-6 a b^2 c C d-3 a^2 A b d^2+A b^3 d^2-a^3 B d^2+3 a b^2 B d^2+3 a^2 b C d^2-b^3 C d^2+i \left (a^3 A c^2-3 a A b^2 c^2-3 a^2 b B c^2+b^3 B c^2-a^3 c^2 C+3 a b^2 c^2 C+6 a^2 A b c d-2 A b^3 c d+2 a^3 B c d-6 a b^2 B c d-6 a^2 b c C d+2 b^3 c C d-a^3 A d^2+3 a A b^2 d^2+3 a^2 b B d^2-b^3 B d^2+a^3 C d^2-3 a b^2 C d^2\right )\right ) \log (i+\tan (e+f x))}{2 \left (c^2+d^2\right )^2 f}+\frac {(b c-a d)^2 \left (b \left (3 c^4 C-2 B c^3 d+c^2 (A+5 C) d^2-4 B c d^3+3 A d^4\right )+a d^2 \left (2 c (A-C) d-B \left (c^2-d^2\right )\right )\right ) \log (c+d \tan (e+f x))}{d^2 \left (c^2+d^2\right )^2 f}-\frac {(b c-a d)^2 \left (a d \left (3 c^2 C-B c d+(A+2 C) d^2\right )-b \left (3 c^3 C-2 B c^2 d+c (A+2 C) d^2-B d^3\right )\right )}{d^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}\right )}{d}}{2 d}
\]
[In]
Integrate[((a + b*Tan[e + f*x])^3*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(c + d*Tan[e + f*x])^2,x]
[Out]
(C*(a + b*Tan[e + f*x])^3)/(2*d*f*(c + d*Tan[e + f*x])) + (((-3*b*c*C + 2*b*B*d + 3*a*C*d)*(a + b*Tan[e + f*x]
)^2)/(d*f*(c + d*Tan[e + f*x])) + (2*(-1/2*(d^2*(-3*a^2*A*b*c^2 + A*b^3*c^2 - a^3*B*c^2 + 3*a*b^2*B*c^2 + 3*a^
2*b*c^2*C - b^3*c^2*C + 2*a^3*A*c*d - 6*a*A*b^2*c*d - 6*a^2*b*B*c*d + 2*b^3*B*c*d - 2*a^3*c*C*d + 6*a*b^2*c*C*
d + 3*a^2*A*b*d^2 - A*b^3*d^2 + a^3*B*d^2 - 3*a*b^2*B*d^2 - 3*a^2*b*C*d^2 + b^3*C*d^2 + I*(a^3*A*c^2 - 3*a*A*b
^2*c^2 - 3*a^2*b*B*c^2 + b^3*B*c^2 - a^3*c^2*C + 3*a*b^2*c^2*C + 6*a^2*A*b*c*d - 2*A*b^3*c*d + 2*a^3*B*c*d - 6
*a*b^2*B*c*d - 6*a^2*b*c*C*d + 2*b^3*c*C*d - a^3*A*d^2 + 3*a*A*b^2*d^2 + 3*a^2*b*B*d^2 - b^3*B*d^2 + a^3*C*d^2
- 3*a*b^2*C*d^2))*Log[I - Tan[e + f*x]])/((c^2 + d^2)^2*f) + (d^2*(3*a^2*A*b*c^2 - A*b^3*c^2 + a^3*B*c^2 - 3*
a*b^2*B*c^2 - 3*a^2*b*c^2*C + b^3*c^2*C - 2*a^3*A*c*d + 6*a*A*b^2*c*d + 6*a^2*b*B*c*d - 2*b^3*B*c*d + 2*a^3*c*
C*d - 6*a*b^2*c*C*d - 3*a^2*A*b*d^2 + A*b^3*d^2 - a^3*B*d^2 + 3*a*b^2*B*d^2 + 3*a^2*b*C*d^2 - b^3*C*d^2 + I*(a
^3*A*c^2 - 3*a*A*b^2*c^2 - 3*a^2*b*B*c^2 + b^3*B*c^2 - a^3*c^2*C + 3*a*b^2*c^2*C + 6*a^2*A*b*c*d - 2*A*b^3*c*d
+ 2*a^3*B*c*d - 6*a*b^2*B*c*d - 6*a^2*b*c*C*d + 2*b^3*c*C*d - a^3*A*d^2 + 3*a*A*b^2*d^2 + 3*a^2*b*B*d^2 - b^3
*B*d^2 + a^3*C*d^2 - 3*a*b^2*C*d^2))*Log[I + Tan[e + f*x]])/(2*(c^2 + d^2)^2*f) + ((b*c - a*d)^2*(b*(3*c^4*C -
2*B*c^3*d + c^2*(A + 5*C)*d^2 - 4*B*c*d^3 + 3*A*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*Log[c + d*Tan[e
+ f*x]])/(d^2*(c^2 + d^2)^2*f) - ((b*c - a*d)^2*(a*d*(3*c^2*C - B*c*d + (A + 2*C)*d^2) - b*(3*c^3*C - 2*B*c^2
*d + c*(A + 2*C)*d^2 - B*d^3)))/(d^2*(c^2 + d^2)*f*(c + d*Tan[e + f*x]))))/d)/(2*d)
Maple [A] (verified)
Time = 0.34 (sec) , antiderivative size = 829, normalized size of antiderivative = 1.43
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{2} C b d}{2}+\tan \left (f x +e \right ) b d B +3 \tan \left (f x +e \right ) C a d -2 \tan \left (f x +e \right ) C b c \right )}{d^{3}}+\frac {\frac {\left (-2 A \,a^{3} c d +3 A \,a^{2} b \,c^{2}-3 A \,a^{2} b \,d^{2}+6 A a \,b^{2} c d -A \,b^{3} c^{2}+A \,b^{3} d^{2}+B \,a^{3} c^{2}-B \,a^{3} d^{2}+6 B \,a^{2} b c d -3 B a \,b^{2} c^{2}+3 B a \,b^{2} d^{2}-2 B \,b^{3} c d +2 C \,a^{3} c d -3 C \,a^{2} b \,c^{2}+3 C \,a^{2} b \,d^{2}-6 C a \,b^{2} c d +C \,b^{3} c^{2}-C \,b^{3} d^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c^{2}-A \,a^{3} d^{2}+6 A \,a^{2} b c d -3 A a \,b^{2} c^{2}+3 A a \,b^{2} d^{2}-2 A \,b^{3} c d +2 B \,a^{3} c d -3 B \,a^{2} b \,c^{2}+3 B \,a^{2} b \,d^{2}-6 B a \,b^{2} c d +B \,b^{3} c^{2}-B \,b^{3} d^{2}-C \,a^{3} c^{2}+C \,a^{3} d^{2}-6 C \,a^{2} b c d +3 C a \,b^{2} c^{2}-3 C a \,b^{2} d^{2}+2 C \,b^{3} c d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{2}}-\frac {A \,d^{5} a^{3}-3 A b c \,d^{4} a^{2}+3 A \,b^{2} c^{2} d^{3} a -A \,b^{3} c^{3} d^{2}-B c \,d^{4} a^{3}+3 B b \,c^{2} d^{3} a^{2}-3 B \,b^{2} c^{3} a \,d^{2}+B \,b^{3} c^{4} d +C \,c^{2} d^{3} a^{3}-3 C b \,c^{3} a^{2} d^{2}+3 C a \,b^{2} c^{4} d -C \,b^{3} c^{5}}{d^{4} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (2 A \,a^{3} c \,d^{5}-3 A \,a^{2} b \,c^{2} d^{4}+3 A \,a^{2} b \,d^{6}-6 A a \,b^{2} c \,d^{5}+A \,b^{3} c^{4} d^{2}+3 A \,b^{3} c^{2} d^{4}-B \,a^{3} c^{2} d^{4}+B \,a^{3} d^{6}-6 B \,a^{2} b c \,d^{5}+3 B a \,b^{2} c^{4} d^{2}+9 B a \,b^{2} c^{2} d^{4}-2 B \,b^{3} c^{5} d -4 B \,b^{3} c^{3} d^{3}-2 C \,a^{3} c \,d^{5}+3 C \,a^{2} b \,c^{4} d^{2}+9 C \,a^{2} b \,c^{2} d^{4}-6 C a \,b^{2} c^{5} d -12 C a \,b^{2} c^{3} d^{3}+3 C \,b^{3} c^{6}+5 C \,b^{3} c^{4} d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{4} \left (c^{2}+d^{2}\right )^{2}}}{f}\) |
\(829\) |
default |
\(\frac {\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{2} C b d}{2}+\tan \left (f x +e \right ) b d B +3 \tan \left (f x +e \right ) C a d -2 \tan \left (f x +e \right ) C b c \right )}{d^{3}}+\frac {\frac {\left (-2 A \,a^{3} c d +3 A \,a^{2} b \,c^{2}-3 A \,a^{2} b \,d^{2}+6 A a \,b^{2} c d -A \,b^{3} c^{2}+A \,b^{3} d^{2}+B \,a^{3} c^{2}-B \,a^{3} d^{2}+6 B \,a^{2} b c d -3 B a \,b^{2} c^{2}+3 B a \,b^{2} d^{2}-2 B \,b^{3} c d +2 C \,a^{3} c d -3 C \,a^{2} b \,c^{2}+3 C \,a^{2} b \,d^{2}-6 C a \,b^{2} c d +C \,b^{3} c^{2}-C \,b^{3} d^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c^{2}-A \,a^{3} d^{2}+6 A \,a^{2} b c d -3 A a \,b^{2} c^{2}+3 A a \,b^{2} d^{2}-2 A \,b^{3} c d +2 B \,a^{3} c d -3 B \,a^{2} b \,c^{2}+3 B \,a^{2} b \,d^{2}-6 B a \,b^{2} c d +B \,b^{3} c^{2}-B \,b^{3} d^{2}-C \,a^{3} c^{2}+C \,a^{3} d^{2}-6 C \,a^{2} b c d +3 C a \,b^{2} c^{2}-3 C a \,b^{2} d^{2}+2 C \,b^{3} c d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{2}}-\frac {A \,d^{5} a^{3}-3 A b c \,d^{4} a^{2}+3 A \,b^{2} c^{2} d^{3} a -A \,b^{3} c^{3} d^{2}-B c \,d^{4} a^{3}+3 B b \,c^{2} d^{3} a^{2}-3 B \,b^{2} c^{3} a \,d^{2}+B \,b^{3} c^{4} d +C \,c^{2} d^{3} a^{3}-3 C b \,c^{3} a^{2} d^{2}+3 C a \,b^{2} c^{4} d -C \,b^{3} c^{5}}{d^{4} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (2 A \,a^{3} c \,d^{5}-3 A \,a^{2} b \,c^{2} d^{4}+3 A \,a^{2} b \,d^{6}-6 A a \,b^{2} c \,d^{5}+A \,b^{3} c^{4} d^{2}+3 A \,b^{3} c^{2} d^{4}-B \,a^{3} c^{2} d^{4}+B \,a^{3} d^{6}-6 B \,a^{2} b c \,d^{5}+3 B a \,b^{2} c^{4} d^{2}+9 B a \,b^{2} c^{2} d^{4}-2 B \,b^{3} c^{5} d -4 B \,b^{3} c^{3} d^{3}-2 C \,a^{3} c \,d^{5}+3 C \,a^{2} b \,c^{4} d^{2}+9 C \,a^{2} b \,c^{2} d^{4}-6 C a \,b^{2} c^{5} d -12 C a \,b^{2} c^{3} d^{3}+3 C \,b^{3} c^{6}+5 C \,b^{3} c^{4} d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{4} \left (c^{2}+d^{2}\right )^{2}}}{f}\) |
\(829\) |
norman |
\(\text {Expression too large to display}\) |
\(1074\) |
parallelrisch |
\(\text {Expression too large to display}\) |
\(3121\) |
risch |
\(\text {Expression too large to display}\) |
\(4264\) |
| | |
|
|
|
[In]
int((a+b*tan(f*x+e))^3*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
[Out]
1/f*(b^2/d^3*(1/2*tan(f*x+e)^2*C*b*d+tan(f*x+e)*b*d*B+3*tan(f*x+e)*C*a*d-2*tan(f*x+e)*C*b*c)+1/(c^2+d^2)^2*(1/
2*(-2*A*a^3*c*d+3*A*a^2*b*c^2-3*A*a^2*b*d^2+6*A*a*b^2*c*d-A*b^3*c^2+A*b^3*d^2+B*a^3*c^2-B*a^3*d^2+6*B*a^2*b*c*
d-3*B*a*b^2*c^2+3*B*a*b^2*d^2-2*B*b^3*c*d+2*C*a^3*c*d-3*C*a^2*b*c^2+3*C*a^2*b*d^2-6*C*a*b^2*c*d+C*b^3*c^2-C*b^
3*d^2)*ln(1+tan(f*x+e)^2)+(A*a^3*c^2-A*a^3*d^2+6*A*a^2*b*c*d-3*A*a*b^2*c^2+3*A*a*b^2*d^2-2*A*b^3*c*d+2*B*a^3*c
*d-3*B*a^2*b*c^2+3*B*a^2*b*d^2-6*B*a*b^2*c*d+B*b^3*c^2-B*b^3*d^2-C*a^3*c^2+C*a^3*d^2-6*C*a^2*b*c*d+3*C*a*b^2*c
^2-3*C*a*b^2*d^2+2*C*b^3*c*d)*arctan(tan(f*x+e)))-1/d^4*(A*a^3*d^5-3*A*a^2*b*c*d^4+3*A*a*b^2*c^2*d^3-A*b^3*c^3
*d^2-B*a^3*c*d^4+3*B*a^2*b*c^2*d^3-3*B*a*b^2*c^3*d^2+B*b^3*c^4*d+C*a^3*c^2*d^3-3*C*a^2*b*c^3*d^2+3*C*a*b^2*c^4
*d-C*b^3*c^5)/(c^2+d^2)/(c+d*tan(f*x+e))+1/d^4*(2*A*a^3*c*d^5-3*A*a^2*b*c^2*d^4+3*A*a^2*b*d^6-6*A*a*b^2*c*d^5+
A*b^3*c^4*d^2+3*A*b^3*c^2*d^4-B*a^3*c^2*d^4+B*a^3*d^6-6*B*a^2*b*c*d^5+3*B*a*b^2*c^4*d^2+9*B*a*b^2*c^2*d^4-2*B*
b^3*c^5*d-4*B*b^3*c^3*d^3-2*C*a^3*c*d^5+3*C*a^2*b*c^4*d^2+9*C*a^2*b*c^2*d^4-6*C*a*b^2*c^5*d-12*C*a*b^2*c^3*d^3
+3*C*b^3*c^6+5*C*b^3*c^4*d^2)/(c^2+d^2)^2*ln(c+d*tan(f*x+e)))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1477 vs. \(2 (577) = 1154\).
Time = 1.10 (sec) , antiderivative size = 1477, normalized size of antiderivative = 2.55
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*tan(f*x+e))^3*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^2,x, algorithm="fricas")
[Out]
1/2*(3*C*b^3*c^5*d^2 - 2*A*a^3*d^7 - 2*(3*C*a*b^2 + B*b^3)*c^4*d^3 + 2*(3*C*a^2*b + 3*B*a*b^2 + (A + C)*b^3)*c
^3*d^4 - 2*(C*a^3 + 3*B*a^2*b + 3*A*a*b^2)*c^2*d^5 + (2*B*a^3 + 6*A*a^2*b + C*b^3)*c*d^6 + (C*b^3*c^4*d^3 + 2*
C*b^3*c^2*d^5 + C*b^3*d^7)*tan(f*x + e)^3 + 2*(((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2 + B*b^3)*c^3*d^4 + 2
*(B*a^3 + 3*(A - C)*a^2*b - 3*B*a*b^2 - (A - C)*b^3)*c^2*d^5 - ((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2 + B*
b^3)*c*d^6)*f*x - (3*C*b^3*c^5*d^2 + 6*C*b^3*c^3*d^4 + 3*C*b^3*c*d^6 - 2*(3*C*a*b^2 + B*b^3)*c^4*d^3 - 4*(3*C*
a*b^2 + B*b^3)*c^2*d^5 - 2*(3*C*a*b^2 + B*b^3)*d^7)*tan(f*x + e)^2 + (3*C*b^3*c^7 - 2*(3*C*a*b^2 + B*b^3)*c^6*
d + (3*C*a^2*b + 3*B*a*b^2 + (A + 5*C)*b^3)*c^5*d^2 - 4*(3*C*a*b^2 + B*b^3)*c^4*d^3 - (B*a^3 + 3*(A - 3*C)*a^2
*b - 9*B*a*b^2 - 3*A*b^3)*c^3*d^4 + 2*((A - C)*a^3 - 3*B*a^2*b - 3*A*a*b^2)*c^2*d^5 + (B*a^3 + 3*A*a^2*b)*c*d^
6 + (3*C*b^3*c^6*d - 2*(3*C*a*b^2 + B*b^3)*c^5*d^2 + (3*C*a^2*b + 3*B*a*b^2 + (A + 5*C)*b^3)*c^4*d^3 - 4*(3*C*
a*b^2 + B*b^3)*c^3*d^4 - (B*a^3 + 3*(A - 3*C)*a^2*b - 9*B*a*b^2 - 3*A*b^3)*c^2*d^5 + 2*((A - C)*a^3 - 3*B*a^2*
b - 3*A*a*b^2)*c*d^6 + (B*a^3 + 3*A*a^2*b)*d^7)*tan(f*x + e))*log((d^2*tan(f*x + e)^2 + 2*c*d*tan(f*x + e) + c
^2)/(tan(f*x + e)^2 + 1)) - (3*C*b^3*c^7 - 2*(3*C*a*b^2 + B*b^3)*c^6*d + (3*C*a^2*b + 3*B*a*b^2 + (A + 5*C)*b^
3)*c^5*d^2 - 4*(3*C*a*b^2 + B*b^3)*c^4*d^3 + (6*C*a^2*b + 6*B*a*b^2 + (2*A + C)*b^3)*c^3*d^4 - 2*(3*C*a*b^2 +
B*b^3)*c^2*d^5 + (3*C*a^2*b + 3*B*a*b^2 + (A - C)*b^3)*c*d^6 + (3*C*b^3*c^6*d - 2*(3*C*a*b^2 + B*b^3)*c^5*d^2
+ (3*C*a^2*b + 3*B*a*b^2 + (A + 5*C)*b^3)*c^4*d^3 - 4*(3*C*a*b^2 + B*b^3)*c^3*d^4 + (6*C*a^2*b + 6*B*a*b^2 + (
2*A + C)*b^3)*c^2*d^5 - 2*(3*C*a*b^2 + B*b^3)*c*d^6 + (3*C*a^2*b + 3*B*a*b^2 + (A - C)*b^3)*d^7)*tan(f*x + e))
*log(1/(tan(f*x + e)^2 + 1)) - (6*C*b^3*c^6*d - C*b^3*d^7 - 4*(3*C*a*b^2 + B*b^3)*c^5*d^2 + (6*C*a^2*b + 6*B*a
*b^2 + (2*A + 7*C)*b^3)*c^4*d^3 - 2*(C*a^3 + 3*B*a^2*b + 3*(A + 2*C)*a*b^2 + 2*B*b^3)*c^3*d^4 + 2*(B*a^3 + 3*A
*a^2*b + C*b^3)*c^2*d^5 - 2*(A*a^3 + 3*C*a*b^2 + B*b^3)*c*d^6 - 2*(((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2
+ B*b^3)*c^2*d^5 + 2*(B*a^3 + 3*(A - C)*a^2*b - 3*B*a*b^2 - (A - C)*b^3)*c*d^6 - ((A - C)*a^3 - 3*B*a^2*b - 3*
(A - C)*a*b^2 + B*b^3)*d^7)*f*x)*tan(f*x + e))/((c^4*d^5 + 2*c^2*d^7 + d^9)*f*tan(f*x + e) + (c^5*d^4 + 2*c^3*
d^6 + c*d^8)*f)
Sympy [C] (verification not implemented)
Result contains complex when optimal does not.
Time = 27.02 (sec) , antiderivative size = 24300, normalized size of antiderivative = 41.97
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*tan(f*x+e))**3*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(c+d*tan(f*x+e))**2,x)
[Out]
Piecewise((zoo*x*(a + b*tan(e))**3*(A + B*tan(e) + C*tan(e)**2)/tan(e)**2, Eq(c, 0) & Eq(d, 0) & Eq(f, 0)), ((
A*a**3*x + 3*A*a**2*b*log(tan(e + f*x)**2 + 1)/(2*f) - 3*A*a*b**2*x + 3*A*a*b**2*tan(e + f*x)/f - A*b**3*log(t
an(e + f*x)**2 + 1)/(2*f) + A*b**3*tan(e + f*x)**2/(2*f) + B*a**3*log(tan(e + f*x)**2 + 1)/(2*f) - 3*B*a**2*b*
x + 3*B*a**2*b*tan(e + f*x)/f - 3*B*a*b**2*log(tan(e + f*x)**2 + 1)/(2*f) + 3*B*a*b**2*tan(e + f*x)**2/(2*f) +
B*b**3*x + B*b**3*tan(e + f*x)**3/(3*f) - B*b**3*tan(e + f*x)/f - C*a**3*x + C*a**3*tan(e + f*x)/f - 3*C*a**2
*b*log(tan(e + f*x)**2 + 1)/(2*f) + 3*C*a**2*b*tan(e + f*x)**2/(2*f) + 3*C*a*b**2*x + C*a*b**2*tan(e + f*x)**3
/f - 3*C*a*b**2*tan(e + f*x)/f + C*b**3*log(tan(e + f*x)**2 + 1)/(2*f) + C*b**3*tan(e + f*x)**4/(4*f) - C*b**3
*tan(e + f*x)**2/(2*f))/c**2, Eq(d, 0)), (-A*a**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*t
an(e + f*x) - 4*d**2*f) + 2*I*A*a**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*
d**2*f) + A*a**3*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - A*a**3*tan(e + f*x)/(4*
d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*I*A*a**3/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2
*f*tan(e + f*x) - 4*d**2*f) + 3*I*A*a**2*b*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e +
f*x) - 4*d**2*f) + 6*A*a**2*b*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f)
- 3*I*A*a**2*b*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*I*A*a**2*b*tan(e + f*x
)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*A*a*b**2*f*x*tan(e + f*x)**2/(4*d**2*f*t
an(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*I*A*a*b**2*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2
- 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*A*a*b**2*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) -
4*d**2*f) - 9*A*a*b**2*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*I*A*a*
b**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*I*A*b**3*f*x*tan(e + f*x)**2/(4*d**2*
f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*A*b**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2
- 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*I*A*b**3*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4
*d**2*f) + 2*A*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*
x) - 4*d**2*f) - 4*I*A*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e
+ f*x) - 4*d**2*f) - 2*A*b**3*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) -
4*d**2*f) - 5*I*A*b**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 4*A*b**3
/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + I*B*a**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(
e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*B*a**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*
d**2*f*tan(e + f*x) - 4*d**2*f) - I*B*a**3*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f)
+ I*B*a**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*B*a**2*b*f*x*tan(
e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*I*B*a**2*b*f*x*tan(e + f*x)/(4
*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*B*a**2*b*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I
*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*B*a**2*b*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x)
- 4*d**2*f) + 6*I*B*a**2*b/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 9*I*B*a*b**2*f*x
*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 18*B*a*b**2*f*x*tan(e + f*x
)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*I*B*a*b**2*f*x/(4*d**2*f*tan(e + f*x)**2
- 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*B*a*b**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e +
f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 12*I*B*a*b**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f
*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*B*a*b**2*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e +
f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 15*I*B*a*b**2*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d*
*2*f*tan(e + f*x) - 4*d**2*f) - 12*B*a*b**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) -
9*B*b**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 18*I*B*b**3*f*x
*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 9*B*b**3*f*x/(4*d**2*f*tan(e +
f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 4*I*B*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f
*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 8*B*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**
2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 4*I*B*b**3*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(
e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 4*B*b**3*tan(e + f*x)**3/(4*d**2*f*tan(e + f*x)**2 - 8*I*d
**2*f*tan(e + f*x) - 4*d**2*f) + 19*B*b**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) -
4*d**2*f) - 14*I*B*b**3/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + C*a**3*f*x*tan(e + f
*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 2*I*C*a**3*f*x*tan(e + f*x)/(4*d**2*f
*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - C*a**3*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan
(e + f*x) - 4*d**2*f) - 3*C*a**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f)
+ 2*I*C*a**3/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 9*I*C*a**2*b*f*x*tan(e + f*x)**
2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 18*C*a**2*b*f*x*tan(e + f*x)/(4*d**2*f*tan
(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*I*C*a**2*b*f*x/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*t
an(e + f*x) - 4*d**2*f) + 6*C*a**2*b*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*
d**2*f*tan(e + f*x) - 4*d**2*f) - 12*I*C*a**2*b*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**
2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*C*a**2*b*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 - 8*I*
d**2*f*tan(e + f*x) - 4*d**2*f) - 15*I*C*a**2*b*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*
x) - 4*d**2*f) - 12*C*a**2*b/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 27*C*a*b**2*f*x
*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 54*I*C*a*b**2*f*x*tan(e + f
*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 27*C*a*b**2*f*x/(4*d**2*f*tan(e + f*x)**
2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*I*C*a*b**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan
(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 24*C*a*b**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2
*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 12*I*C*a*b**2*log(tan(e + f*x)**2 + 1)/(4*d**2*f*ta
n(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*C*a*b**2*tan(e + f*x)**3/(4*d**2*f*tan(e + f*x)**2 -
8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 57*C*a*b**2*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e +
f*x) - 4*d**2*f) - 42*I*C*a*b**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 15*I*C*b**3
*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 30*C*b**3*f*x*tan(e + f
*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 15*I*C*b**3*f*x/(4*d**2*f*tan(e + f*x)**
2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 8*C*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e +
f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 16*I*C*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*ta
n(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 8*C*b**3*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)
**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*C*b**3*tan(e + f*x)**4/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*ta
n(e + f*x) - 4*d**2*f) + 4*I*C*b**3*tan(e + f*x)**3/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d*
*2*f) + 29*I*C*b**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 22*C*b**3/(
4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) - 4*d**2*f), Eq(c, -I*d)), (-A*a**3*f*x*tan(e + f*x)**2/(4*
d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 2*I*A*a**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f
*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + A*a**3*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x)
- 4*d**2*f) - A*a**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 2*I*A*a**3
/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*I*A*a**2*b*f*x*tan(e + f*x)**2/(4*d**2*f*
tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*A*a**2*b*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2
+ 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*I*A*a**2*b*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) -
4*d**2*f) - 3*I*A*a**2*b*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*A*a
*b**2*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*I*A*a*b**2*f*x*t
an(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*A*a*b**2*f*x/(4*d**2*f*tan(e +
f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*A*a*b**2*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*
f*tan(e + f*x) - 4*d**2*f) - 6*I*A*a*b**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*
I*A*b**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*A*b**3*f*x*ta
n(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 3*I*A*b**3*f*x/(4*d**2*f*tan(e +
f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*A*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*ta
n(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 4*I*A*b**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2
*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 2*A*b**3*log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e +
f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 5*I*A*b**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*
f*tan(e + f*x) - 4*d**2*f) - 4*A*b**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - I*B*a*
*3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*B*a**3*f*x*tan(e +
f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + I*B*a**3*f*x/(4*d**2*f*tan(e + f*x)**2
+ 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - I*B*a**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f
*x) - 4*d**2*f) + 3*B*a**2*b*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*
f) + 6*I*B*a**2*b*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*B*a**2*
b*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*B*a**2*b*tan(e + f*x)/(4*d**2*f*tan(
e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*I*B*a**2*b/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e
+ f*x) - 4*d**2*f) - 9*I*B*a*b**2*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*
d**2*f) + 18*B*a*b**2*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 9*I*B
*a*b**2*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*B*a*b**2*log(tan(e + f*x)**2 +
1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*I*B*a*b**2*log(tan(e
+ f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*B*a*b**2*log(t
an(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 15*I*B*a*b**2*tan(e + f*
x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 12*B*a*b**2/(4*d**2*f*tan(e + f*x)**2 + 8
*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 9*B*b**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e
+ f*x) - 4*d**2*f) - 18*I*B*b**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**
2*f) + 9*B*b**3*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 4*I*B*b**3*log(tan(e + f
*x)**2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 8*B*b**3*log(tan
(e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 4*I*B*b**3*lo
g(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 4*B*b**3*tan(e + f*x)
**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 19*B*b**3*tan(e + f*x)/(4*d**2*f*tan(e +
f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 14*I*B*b**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*
x) - 4*d**2*f) + C*a**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) +
2*I*C*a**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - C*a**3*f*x/(4*d*
*2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 3*C*a**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 +
8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 2*I*C*a**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2
*f) - 9*I*C*a**2*b*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 18*C*
a**2*b*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 9*I*C*a**2*b*f*x/(4*
d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 6*C*a**2*b*log(tan(e + f*x)**2 + 1)*tan(e + f*x
)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*I*C*a**2*b*log(tan(e + f*x)**2 + 1)*
tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 6*C*a**2*b*log(tan(e + f*x)**2
+ 1)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 15*I*C*a**2*b*tan(e + f*x)/(4*d**2*f*ta
n(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 12*C*a**2*b/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e
+ f*x) - 4*d**2*f) - 27*C*a*b**2*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*
d**2*f) - 54*I*C*a*b**2*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 27*
C*a*b**2*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 12*I*C*a*b**2*log(tan(e + f*x)*
*2 + 1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 24*C*a*b**2*log(tan(
e + f*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*I*C*a*b**2*
log(tan(e + f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 12*C*a*b**2*tan(e +
f*x)**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 57*C*a*b**2*tan(e + f*x)/(4*d**2*f*
tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 42*I*C*a*b**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*t
an(e + f*x) - 4*d**2*f) + 15*I*C*b**3*f*x*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x)
- 4*d**2*f) - 30*C*b**3*f*x*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 15*
I*C*b**3*f*x/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 8*C*b**3*log(tan(e + f*x)**2 +
1)*tan(e + f*x)**2/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 16*I*C*b**3*log(tan(e + f
*x)**2 + 1)*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 8*C*b**3*log(tan(e
+ f*x)**2 + 1)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) + 2*C*b**3*tan(e + f*x)**4/(4*d
**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 4*I*C*b**3*tan(e + f*x)**3/(4*d**2*f*tan(e + f*x
)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f) - 29*I*C*b**3*tan(e + f*x)/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*t
an(e + f*x) - 4*d**2*f) + 22*C*b**3/(4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) - 4*d**2*f), Eq(c, I*d
)), (x*(a + b*tan(e))**3*(A + B*tan(e) + C*tan(e)**2)/(c + d*tan(e))**2, Eq(f, 0)), (2*A*a**3*c**3*d**4*f*x/(2
*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f
*tan(e + f*x)) + 2*A*a**3*c**2*d**5*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6
*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*A*a**3*c**2*d**5*log(c/d + tan(e + f
*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2
*d**9*f*tan(e + f*x)) - 2*A*a**3*c**2*d**5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x
) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*A*a**3*c**2*d**5/(2*c
**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*t
an(e + f*x)) - 2*A*a**3*c*d**6*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f
*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*A*a**3*c*d**6*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*
c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*
tan(e + f*x)) - 2*A*a**3*c*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f
*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*A*a**3*d**7*f*x*tan
(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*
f + 2*d**9*f*tan(e + f*x)) - 2*A*a**3*d**7/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**
2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*A*a**2*b*c**3*d**4*log(c/d + tan(e + f*x))/(2*
c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*
tan(e + f*x)) + 3*A*a**2*b*c**3*d**4*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*
c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*a**2*b*c**3*d**4/(2*c**5*
d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e
+ f*x)) + 12*A*a**2*b*c**2*d**5*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7
*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*A*a**2*b*c**2*d**5*log(c/d + tan(e + f*x))*tan(e + f
*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*
d**9*f*tan(e + f*x)) + 3*A*a**2*b*c**2*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5
*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 12*A*a**2
*b*c*d**6*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e +
f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*a**2*b*c*d**6*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**
4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*A
*a**2*b*c*d**6*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d
**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*a**2*b*c*d**6/(2*c**5*d**4*f + 2*c**4*d**5*f*ta
n(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*a**2*b*d**
7*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d*
*7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*A*a**2*b*d**7*log(tan(e + f*x)**2 + 1)*tan(e + f*x
)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d*
*9*f*tan(e + f*x)) - 6*A*a*b**2*c**4*d**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2
*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*A*a*b**2*c**3*d**4*f*x/(2*c**5*d**4*f + 2*c**4*
d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*A*a
*b**2*c**2*d**5*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*t
an(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 12*A*a*b**2*c**2*d**5*log(c/d + tan(e + f*x))/(2*c**5*d**4
*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f
*x)) + 6*A*a*b**2*c**2*d**5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6
*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*A*a*b**2*c**2*d**5/(2*c**5*d**4*f +
2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x))
+ 6*A*a*b**2*c*d**6*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*
x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 12*A*a*b**2*c*d**6*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**
4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e +
f*x)) + 6*A*a*b**2*c*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) +
4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*a*b**2*d**7*f*x*tan(e +
f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f +
2*d**9*f*tan(e + f*x)) + 2*A*b**3*c**5*d**2*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x
) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*A*b**3*c**5*d**2/(2*c
**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*t
an(e + f*x)) + 2*A*b**3*c**4*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e +
f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*b**3*c**3*d**4*l
og(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x
) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - A*b**3*c**3*d**4*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d*
*5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*A*b**
3*c**3*d**4/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**
8*f + 2*d**9*f*tan(e + f*x)) - 4*A*b**3*c**2*d**5*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**
6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*A*b**3*c**2*d**5*log(c/d + tan(e +
f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) +
2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - A*b**3*c**2*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f +
2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x))
- 4*A*b**3*c*d**6*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f
*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + A*b**3*c*d**6*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f +
2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x))
+ A*b**3*d**7*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*
f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*B*a**3*c**3*d**4*log(c/d + tan(e + f*
x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*
d**9*f*tan(e + f*x)) + B*a**3*c**3*d**4*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) +
4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*a**3*c**3*d**4/(2*c**5
*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(
e + f*x)) + 4*B*a**3*c**2*d**5*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f
*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*B*a**3*c**2*d**5*log(c/d + tan(e + f*x))*tan(e + f*x)/
(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9
*f*tan(e + f*x)) + B*a**3*c**2*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*B*a**3*c*d**6*f
*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c
*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*a**3*c*d**6*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(
e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - B*a**3*c*d**6*lo
g(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x
) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*a**3*c*d**6/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3
*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*a**3*d**7*log(c/d + tan(e + f
*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2
*c*d**8*f + 2*d**9*f*tan(e + f*x)) - B*a**3*d**7*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4
*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*B*
a**2*b*c**4*d**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*
c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*B*a**2*b*c**3*d**4*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c
**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*B*a**2*b*c**2*d**5*f*x*tan(e
+ f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f
+ 2*d**9*f*tan(e + f*x)) - 12*B*a**2*b*c**2*d**5*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a**2*b*c**2*d*
*5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e
+ f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*B*a**2*b*c**2*d**5/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x
) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a**2*b*c*d**6*f*x/(
2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*
f*tan(e + f*x)) - 12*B*a**2*b*c*d**6*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a**2*b*c*d**6
*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d*
*7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a**2*b*d**7*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*
c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) +
6*B*a*b**2*c**5*d**2*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c
**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a*b**2*c**5*d**2/(2*c**5*d**4*f + 2*c**4*d
**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a*
b**2*c**4*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*
f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 18*B*a*b**2*c**3*d**4*log(c/d + tan(e +
f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f +
2*d**9*f*tan(e + f*x)) - 3*B*a*b**2*c**3*d**4*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e +
f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*B*a*b**2*c**3*d**
4/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d*
*9*f*tan(e + f*x)) - 12*B*a*b**2*c**2*d**5*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4
*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 18*B*a*b**2*c**2*d**5*log(c/d + tan(e + f*x)
)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*
d**8*f + 2*d**9*f*tan(e + f*x)) - 3*B*a*b**2*c**2*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f +
2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x))
- 12*B*a*b**2*c*d**6*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**
7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 3*B*a*b**2*c*d**6*log(tan(e + f*x)**2 + 1)/(2*c**5*d*
*4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e +
f*x)) + 3*B*a*b**2*d**7*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4
*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 4*B*b**3*c**6*d*log(c/d + ta
n(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**
8*f + 2*d**9*f*tan(e + f*x)) - 4*B*b**3*c**6*d/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4
*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 4*B*b**3*c**5*d**2*log(c/d + tan(e + f*x))*t
an(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**
8*f + 2*d**9*f*tan(e + f*x)) - 8*B*b**3*c**4*d**3*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*b**3*c**4*d**
3*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2
*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*B*b**3*c**4*d**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d
**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*b**3*c**3*d**4*f*x/(2*c**5*d**4
*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f
*x)) - 8*B*b**3*c**3*d**4*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4
*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*B*b**3*c**2*d**5*f*x*tan(e
+ f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f
+ 2*d**9*f*tan(e + f*x)) - 2*B*b**3*c**2*d**5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e +
f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*B*b**3*c**2*d**5*t
an(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*
d**8*f + 2*d**9*f*tan(e + f*x)) - 2*B*b**3*c**2*d**5/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6
*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*B*b**3*c*d**6*f*x/(2*c**5*d**4*f + 2
*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) -
2*B*b**3*c*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d*
*6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*B*b**3*d**7*f*x*tan(e + f*x)/(2*c*
*5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*ta
n(e + f*x)) + 2*B*b**3*d**7*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c*
*2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*C*a**3*c**4*d**3/(2*c**5*d**4*f + 2*c**4*d**5
*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*C*a**3*
c**3*d**4*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d
**8*f + 2*d**9*f*tan(e + f*x)) - 2*C*a**3*c**2*d**5*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*
x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 4*C*a**3*c**2*d**5*log
(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x)
+ 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*C*a**3*c**2*d**5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d*
*5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 2*C*a**
3*c**2*d**5/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**
8*f + 2*d**9*f*tan(e + f*x)) + 2*C*a**3*c*d**6*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f
+ 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 4*C*a**3*c*d**6*log(c/d + tan(e + f*x))*
tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d*
*8*f + 2*d**9*f*tan(e + f*x)) + 2*C*a**3*c*d**6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*
d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*C*a
**3*d**7*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e +
f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*a**2*b*c**5*d**2*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c
**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6
*C*a**2*b*c**5*d**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) +
2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*a**2*b*c**4*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*
f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*
x)) + 18*C*a**2*b*c**3*d**4*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*
f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*C*a**2*b*c**3*d**4*log(tan(e + f*x)**
2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f +
2*d**9*f*tan(e + f*x)) + 6*C*a**2*b*c**3*d**4/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4
*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 12*C*a**2*b*c**2*d**5*f*x/(2*c**5*d**4*f + 2
*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) +
18*C*a**2*b*c**2*d**5*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c*
*3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*C*a**2*b*c**2*d**5*log(tan(e
+ f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e
+ f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 12*C*a**2*b*c*d**6*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**
5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 3*C*a**2
*b*c*d**6*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f
*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 3*C*a**2*b*d**7*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2
*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f
*tan(e + f*x)) - 12*C*a*b**2*c**6*d*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c*
*3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 12*C*a*b**2*c**6*d/(2*c**5*d**4
*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f
*x)) - 12*C*a*b**2*c**5*d**2*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x)
+ 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 24*C*a*b**2*c**4*d**3*log
(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x)
+ 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*a*b**2*c**4*d**3*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*ta
n(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 18*C*a*b**2*c*
*4*d**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f
+ 2*d**9*f*tan(e + f*x)) + 6*C*a*b**2*c**3*d**4*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*
f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 24*C*a*b**2*c**3*d**4*log(c/d + tan(e +
f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) +
2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*a*b**2*c**2*d**5*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*ta
n(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*C*a*b**2*c**
2*d**5*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*ta
n(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 12*C*a*b**2*c**2*d**5*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c*
*4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*
C*a*b**2*c**2*d**5/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) +
2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*C*a*b**2*c*d**6*f*x/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c*
*3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*C*a*b**2*c*d**6*log(tan(e + f
*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f
*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*C*a*b**2*d**7*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*ta
n(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*a*b**2*d**
7*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2
*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*b**3*c**7*log(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(
e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 6*C*b**3*c**7/(2
*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f
*tan(e + f*x)) + 6*C*b**3*c**6*d*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f
*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 10*C*b**3*c**5*d**2*l
og(c/d + tan(e + f*x))/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x
) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*C*b**3*c**5*d**2*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*ta
n(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 10*C*b**3*c**5
*d**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f +
2*d**9*f*tan(e + f*x)) + 10*C*b**3*c**4*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5
*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + C*b**3*c*
*4*d**3*tan(e + f*x)**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*
x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + C*b**3*c**3*d**4*log(tan(e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d
**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - 6*C*b*
*3*c**3*d**4*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e
+ f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*C*b**3*c**3*d**4/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x)
+ 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*C*b**3*c**2*d**5*f*x/(
2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*
f*tan(e + f*x)) + C*b**3*c**2*d**5*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + 2*C*b**3*c**2*d**5
*tan(e + f*x)**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*
c*d**8*f + 2*d**9*f*tan(e + f*x)) + 4*C*b**3*c*d**6*f*x*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*
x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - C*b**3*c*d**6*log(tan(
e + f*x)**2 + 1)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*
c*d**8*f + 2*d**9*f*tan(e + f*x)) - 3*C*b**3*c*d**6*tan(e + f*x)**2/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x
) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) - C*b**3*d**7*log(tan(e +
f*x)**2 + 1)*tan(e + f*x)/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e + f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e +
f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)) + C*b**3*d**7*tan(e + f*x)**3/(2*c**5*d**4*f + 2*c**4*d**5*f*tan(e
+ f*x) + 4*c**3*d**6*f + 4*c**2*d**7*f*tan(e + f*x) + 2*c*d**8*f + 2*d**9*f*tan(e + f*x)), True))
Maxima [A] (verification not implemented)
none
Time = 0.34 (sec) , antiderivative size = 684, normalized size of antiderivative = 1.18
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\frac {\frac {2 \, {\left ({\left ({\left (A - C\right )} a^{3} - 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} + B b^{3}\right )} c^{2} + 2 \, {\left (B a^{3} + 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} - {\left (A - C\right )} b^{3}\right )} c d - {\left ({\left (A - C\right )} a^{3} - 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} + B b^{3}\right )} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {2 \, {\left (3 \, C b^{3} c^{6} - 2 \, {\left (3 \, C a b^{2} + B b^{3}\right )} c^{5} d + {\left (3 \, C a^{2} b + 3 \, B a b^{2} + {\left (A + 5 \, C\right )} b^{3}\right )} c^{4} d^{2} - 4 \, {\left (3 \, C a b^{2} + B b^{3}\right )} c^{3} d^{3} - {\left (B a^{3} + 3 \, {\left (A - 3 \, C\right )} a^{2} b - 9 \, B a b^{2} - 3 \, A b^{3}\right )} c^{2} d^{4} + 2 \, {\left ({\left (A - C\right )} a^{3} - 3 \, B a^{2} b - 3 \, A a b^{2}\right )} c d^{5} + {\left (B a^{3} + 3 \, A a^{2} b\right )} d^{6}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{4} d^{4} + 2 \, c^{2} d^{6} + d^{8}} + \frac {{\left ({\left (B a^{3} + 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} - {\left (A - C\right )} b^{3}\right )} c^{2} - 2 \, {\left ({\left (A - C\right )} a^{3} - 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} + B b^{3}\right )} c d - {\left (B a^{3} + 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} - {\left (A - C\right )} b^{3}\right )} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {2 \, {\left (C b^{3} c^{5} - A a^{3} d^{5} - {\left (3 \, C a b^{2} + B b^{3}\right )} c^{4} d + {\left (3 \, C a^{2} b + 3 \, B a b^{2} + A b^{3}\right )} c^{3} d^{2} - {\left (C a^{3} + 3 \, B a^{2} b + 3 \, A a b^{2}\right )} c^{2} d^{3} + {\left (B a^{3} + 3 \, A a^{2} b\right )} c d^{4}\right )}}{c^{3} d^{4} + c d^{6} + {\left (c^{2} d^{5} + d^{7}\right )} \tan \left (f x + e\right )} + \frac {C b^{3} d \tan \left (f x + e\right )^{2} - 2 \, {\left (2 \, C b^{3} c - {\left (3 \, C a b^{2} + B b^{3}\right )} d\right )} \tan \left (f x + e\right )}{d^{3}}}{2 \, f}
\]
[In]
integrate((a+b*tan(f*x+e))^3*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^2,x, algorithm="maxima")
[Out]
1/2*(2*(((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2 + B*b^3)*c^2 + 2*(B*a^3 + 3*(A - C)*a^2*b - 3*B*a*b^2 - (A
- C)*b^3)*c*d - ((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2 + B*b^3)*d^2)*(f*x + e)/(c^4 + 2*c^2*d^2 + d^4) + 2
*(3*C*b^3*c^6 - 2*(3*C*a*b^2 + B*b^3)*c^5*d + (3*C*a^2*b + 3*B*a*b^2 + (A + 5*C)*b^3)*c^4*d^2 - 4*(3*C*a*b^2 +
B*b^3)*c^3*d^3 - (B*a^3 + 3*(A - 3*C)*a^2*b - 9*B*a*b^2 - 3*A*b^3)*c^2*d^4 + 2*((A - C)*a^3 - 3*B*a^2*b - 3*A
*a*b^2)*c*d^5 + (B*a^3 + 3*A*a^2*b)*d^6)*log(d*tan(f*x + e) + c)/(c^4*d^4 + 2*c^2*d^6 + d^8) + ((B*a^3 + 3*(A
- C)*a^2*b - 3*B*a*b^2 - (A - C)*b^3)*c^2 - 2*((A - C)*a^3 - 3*B*a^2*b - 3*(A - C)*a*b^2 + B*b^3)*c*d - (B*a^3
+ 3*(A - C)*a^2*b - 3*B*a*b^2 - (A - C)*b^3)*d^2)*log(tan(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) + 2*(C*b^3*
c^5 - A*a^3*d^5 - (3*C*a*b^2 + B*b^3)*c^4*d + (3*C*a^2*b + 3*B*a*b^2 + A*b^3)*c^3*d^2 - (C*a^3 + 3*B*a^2*b + 3
*A*a*b^2)*c^2*d^3 + (B*a^3 + 3*A*a^2*b)*c*d^4)/(c^3*d^4 + c*d^6 + (c^2*d^5 + d^7)*tan(f*x + e)) + (C*b^3*d*tan
(f*x + e)^2 - 2*(2*C*b^3*c - (3*C*a*b^2 + B*b^3)*d)*tan(f*x + e))/d^3)/f
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1327 vs. \(2 (577) = 1154\).
Time = 1.14 (sec) , antiderivative size = 1327, normalized size of antiderivative = 2.29
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\text {Too large to display}
\]
[In]
integrate((a+b*tan(f*x+e))^3*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^2,x, algorithm="giac")
[Out]
1/2*(2*(A*a^3*c^2 - C*a^3*c^2 - 3*B*a^2*b*c^2 - 3*A*a*b^2*c^2 + 3*C*a*b^2*c^2 + B*b^3*c^2 + 2*B*a^3*c*d + 6*A*
a^2*b*c*d - 6*C*a^2*b*c*d - 6*B*a*b^2*c*d - 2*A*b^3*c*d + 2*C*b^3*c*d - A*a^3*d^2 + C*a^3*d^2 + 3*B*a^2*b*d^2
+ 3*A*a*b^2*d^2 - 3*C*a*b^2*d^2 - B*b^3*d^2)*(f*x + e)/(c^4 + 2*c^2*d^2 + d^4) + (B*a^3*c^2 + 3*A*a^2*b*c^2 -
3*C*a^2*b*c^2 - 3*B*a*b^2*c^2 - A*b^3*c^2 + C*b^3*c^2 - 2*A*a^3*c*d + 2*C*a^3*c*d + 6*B*a^2*b*c*d + 6*A*a*b^2*
c*d - 6*C*a*b^2*c*d - 2*B*b^3*c*d - B*a^3*d^2 - 3*A*a^2*b*d^2 + 3*C*a^2*b*d^2 + 3*B*a*b^2*d^2 + A*b^3*d^2 - C*
b^3*d^2)*log(tan(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) + 2*(3*C*b^3*c^6 - 6*C*a*b^2*c^5*d - 2*B*b^3*c^5*d +
3*C*a^2*b*c^4*d^2 + 3*B*a*b^2*c^4*d^2 + A*b^3*c^4*d^2 + 5*C*b^3*c^4*d^2 - 12*C*a*b^2*c^3*d^3 - 4*B*b^3*c^3*d^3
- B*a^3*c^2*d^4 - 3*A*a^2*b*c^2*d^4 + 9*C*a^2*b*c^2*d^4 + 9*B*a*b^2*c^2*d^4 + 3*A*b^3*c^2*d^4 + 2*A*a^3*c*d^5
- 2*C*a^3*c*d^5 - 6*B*a^2*b*c*d^5 - 6*A*a*b^2*c*d^5 + B*a^3*d^6 + 3*A*a^2*b*d^6)*log(abs(d*tan(f*x + e) + c))
/(c^4*d^4 + 2*c^2*d^6 + d^8) - 2*(3*C*b^3*c^6*d*tan(f*x + e) - 6*C*a*b^2*c^5*d^2*tan(f*x + e) - 2*B*b^3*c^5*d^
2*tan(f*x + e) + 3*C*a^2*b*c^4*d^3*tan(f*x + e) + 3*B*a*b^2*c^4*d^3*tan(f*x + e) + A*b^3*c^4*d^3*tan(f*x + e)
+ 5*C*b^3*c^4*d^3*tan(f*x + e) - 12*C*a*b^2*c^3*d^4*tan(f*x + e) - 4*B*b^3*c^3*d^4*tan(f*x + e) - B*a^3*c^2*d^
5*tan(f*x + e) - 3*A*a^2*b*c^2*d^5*tan(f*x + e) + 9*C*a^2*b*c^2*d^5*tan(f*x + e) + 9*B*a*b^2*c^2*d^5*tan(f*x +
e) + 3*A*b^3*c^2*d^5*tan(f*x + e) + 2*A*a^3*c*d^6*tan(f*x + e) - 2*C*a^3*c*d^6*tan(f*x + e) - 6*B*a^2*b*c*d^6
*tan(f*x + e) - 6*A*a*b^2*c*d^6*tan(f*x + e) + B*a^3*d^7*tan(f*x + e) + 3*A*a^2*b*d^7*tan(f*x + e) + 2*C*b^3*c
^7 - 3*C*a*b^2*c^6*d - B*b^3*c^6*d + 4*C*b^3*c^5*d^2 + C*a^3*c^4*d^3 + 3*B*a^2*b*c^4*d^3 + 3*A*a*b^2*c^4*d^3 -
9*C*a*b^2*c^4*d^3 - 3*B*b^3*c^4*d^3 - 2*B*a^3*c^3*d^4 - 6*A*a^2*b*c^3*d^4 + 6*C*a^2*b*c^3*d^4 + 6*B*a*b^2*c^3
*d^4 + 2*A*b^3*c^3*d^4 + 3*A*a^3*c^2*d^5 - C*a^3*c^2*d^5 - 3*B*a^2*b*c^2*d^5 - 3*A*a*b^2*c^2*d^5 + A*a^3*d^7)/
((c^4*d^4 + 2*c^2*d^6 + d^8)*(d*tan(f*x + e) + c)) + (C*b^3*d^2*tan(f*x + e)^2 - 4*C*b^3*c*d*tan(f*x + e) + 6*
C*a*b^2*d^2*tan(f*x + e) + 2*B*b^3*d^2*tan(f*x + e))/d^4)/f
Mupad [B] (verification not implemented)
Time = 15.62 (sec) , antiderivative size = 701, normalized size of antiderivative = 1.21
\[
\int \frac {(a+b \tan (e+f x))^3 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx=\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {B\,b^3+3\,C\,a\,b^2}{d^2}-\frac {2\,C\,b^3\,c}{d^3}\right )}{f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (B\,a^3-A\,b^3+C\,b^3+3\,A\,a^2\,b-3\,B\,a\,b^2-3\,C\,a^2\,b+A\,a^3\,1{}\mathrm {i}+B\,b^3\,1{}\mathrm {i}-C\,a^3\,1{}\mathrm {i}-A\,a\,b^2\,3{}\mathrm {i}-B\,a^2\,b\,3{}\mathrm {i}+C\,a\,b^2\,3{}\mathrm {i}\right )}{2\,f\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}+\frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (d^4\,\left (3\,A\,b^3\,c^2-B\,a^3\,c^2-3\,A\,a^2\,b\,c^2+9\,B\,a\,b^2\,c^2+9\,C\,a^2\,b\,c^2\right )-d^5\,\left (2\,C\,a^3\,c-2\,A\,a^3\,c+6\,A\,a\,b^2\,c+6\,B\,a^2\,b\,c\right )-d^3\,\left (4\,B\,b^3\,c^3+12\,C\,a\,b^2\,c^3\right )+d^6\,\left (B\,a^3+3\,A\,b\,a^2\right )-d\,\left (2\,B\,b^3\,c^5+6\,C\,a\,b^2\,c^5\right )+d^2\,\left (A\,b^3\,c^4+5\,C\,b^3\,c^4+3\,B\,a\,b^2\,c^4+3\,C\,a^2\,b\,c^4\right )+3\,C\,b^3\,c^6\right )}{f\,\left (c^4\,d^4+2\,c^2\,d^6+d^8\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (A\,a^3-A\,b^3\,1{}\mathrm {i}+B\,a^3\,1{}\mathrm {i}+B\,b^3-C\,a^3+C\,b^3\,1{}\mathrm {i}-3\,A\,a\,b^2+A\,a^2\,b\,3{}\mathrm {i}-B\,a\,b^2\,3{}\mathrm {i}-3\,B\,a^2\,b+3\,C\,a\,b^2-C\,a^2\,b\,3{}\mathrm {i}\right )}{2\,f\,\left (-c^2\,1{}\mathrm {i}+2\,c\,d+d^2\,1{}\mathrm {i}\right )}-\frac {C\,a^3\,c^2\,d^3-B\,a^3\,c\,d^4+A\,a^3\,d^5-3\,C\,a^2\,b\,c^3\,d^2+3\,B\,a^2\,b\,c^2\,d^3-3\,A\,a^2\,b\,c\,d^4+3\,C\,a\,b^2\,c^4\,d-3\,B\,a\,b^2\,c^3\,d^2+3\,A\,a\,b^2\,c^2\,d^3-C\,b^3\,c^5+B\,b^3\,c^4\,d-A\,b^3\,c^3\,d^2}{d\,f\,\left (\mathrm {tan}\left (e+f\,x\right )\,d^4+c\,d^3\right )\,\left (c^2+d^2\right )}+\frac {C\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,d^2\,f}
\]
[In]
int(((a + b*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^2,x)
[Out]
(tan(e + f*x)*((B*b^3 + 3*C*a*b^2)/d^2 - (2*C*b^3*c)/d^3))/f - (log(tan(e + f*x) + 1i)*(A*a^3*1i - A*b^3 + B*a
^3 + B*b^3*1i - C*a^3*1i + C*b^3 - A*a*b^2*3i + 3*A*a^2*b - 3*B*a*b^2 - B*a^2*b*3i + C*a*b^2*3i - 3*C*a^2*b))/
(2*f*(c*d*2i - c^2 + d^2)) + (log(c + d*tan(e + f*x))*(d^4*(3*A*b^3*c^2 - B*a^3*c^2 - 3*A*a^2*b*c^2 + 9*B*a*b^
2*c^2 + 9*C*a^2*b*c^2) - d^5*(2*C*a^3*c - 2*A*a^3*c + 6*A*a*b^2*c + 6*B*a^2*b*c) - d^3*(4*B*b^3*c^3 + 12*C*a*b
^2*c^3) + d^6*(B*a^3 + 3*A*a^2*b) - d*(2*B*b^3*c^5 + 6*C*a*b^2*c^5) + d^2*(A*b^3*c^4 + 5*C*b^3*c^4 + 3*B*a*b^2
*c^4 + 3*C*a^2*b*c^4) + 3*C*b^3*c^6))/(f*(d^8 + 2*c^2*d^6 + c^4*d^4)) - (log(tan(e + f*x) - 1i)*(A*a^3 - A*b^3
*1i + B*a^3*1i + B*b^3 - C*a^3 + C*b^3*1i - 3*A*a*b^2 + A*a^2*b*3i - B*a*b^2*3i - 3*B*a^2*b + 3*C*a*b^2 - C*a^
2*b*3i))/(2*f*(2*c*d - c^2*1i + d^2*1i)) - (A*a^3*d^5 - C*b^3*c^5 - B*a^3*c*d^4 + B*b^3*c^4*d - A*b^3*c^3*d^2
+ C*a^3*c^2*d^3 + 3*A*a*b^2*c^2*d^3 - 3*B*a*b^2*c^3*d^2 + 3*B*a^2*b*c^2*d^3 - 3*C*a^2*b*c^3*d^2 - 3*A*a^2*b*c*
d^4 + 3*C*a*b^2*c^4*d)/(d*f*(c*d^3 + d^4*tan(e + f*x))*(c^2 + d^2)) + (C*b^3*tan(e + f*x)^2)/(2*d^2*f)